package com.jkoss.dao.oa;

import com.jkoss.pojo.oa.Ossqq;
import com.jkoss.pojo.oa.Salary;
import com.jkoss.pojo.oa.SalaryExample;
import com.jkoss.tool.Page;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestMapping;

public interface SalaryMapper {
	
	
	
	@Select("select a.*,b.ename,c.depID from t_salary a,t_emps b , t_jobs c where a.eid =b.eid and b.jobid=c.jobid and c.depID=#{depID}") 
	@RequestMapping("com.jkoss.dao.oa.Salary.BaseResultMap2")
	List<Salary> selectAtPageByDept(Page page , @Param("depID")  Integer depID);
	
	@Select("SELECT a.eid,a.ename,b.jobsal as basicsalary,b.jxsal as meritsal,b.thrsal as addsal,c.depID FROM t_emps a INNER JOIN t_jobs b  ON a.jobid = b.jobid INNER JOIN t_department c ON b.depID = c.depID and c.depID=#{depID}") 
	@RequestMapping("com.jkoss.dao.oa.Salary.BaseResultMap2")
	List<Salary> selectSalaryByDept(@Param("depID")  Integer depID);
	
	
	@Select("select a.*,b.ename,0 as depID  from t_salary a,t_emps b  where a.eid =b.eid and  a.salid=#{salid}") 
	@RequestMapping("com.jkoss.dao.oa.Salary.BaseResultMap2")
    Salary selectByID(@Param("salid")  Integer salid);
	
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_salary
     *
     * @mbggenerated
     */
    int countByExample(SalaryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_salary
     *
     * @mbggenerated
     */
    int deleteByExample(SalaryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_salary
     *
     * @mbggenerated
     */
    int deleteByPrimaryKey(Integer salid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_salary
     *
     * @mbggenerated
     */
    int insert(Salary record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_salary
     *
     * @mbggenerated
     */
    int insertSelective(Salary record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_salary
     *
     * @mbggenerated
     */
    List<Salary> selectByExample(SalaryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_salary
     *
     * @mbggenerated
     */
    Salary selectByPrimaryKey(Integer salid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_salary
     *
     * @mbggenerated
     */
    int updateByExampleSelective(@Param("record") Salary record, @Param("example") SalaryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_salary
     *
     * @mbggenerated
     */
    int updateByExample(@Param("record") Salary record, @Param("example") SalaryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_salary
     *
     * @mbggenerated
     */
    int updateByPrimaryKeySelective(Salary record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_salary
     *
     * @mbggenerated
     */
    int updateByPrimaryKey(Salary record);
    
    
}